POV-Ray : Newsgroups : povray.general : Specs for df3- files : Re: Specs for df3- files Server Time
30 Jul 2024 22:22:36 EDT (-0400)
  Re: Specs for df3- files  
From: minzi0815
Date: 14 May 2008 05:25:00
Message: <web.482aae968637a0d8c32955910@news.povray.org>
Chris,


yes, this did help. Looks like I understood the format and I have already
written a little perl-script to generate random numbers in a desity-file. If
you're interested:

#!/usr/bin/perl


open(DF3OUT,"> mmtest.df3");
binmode(IF);

$x=0; $y=0; $z=0;


$xval=pack "n",1000;
$yval=pack "n",1000;
$zval=pack "n",1000;

print( DF3OUT $xval,$yval,$zval );


while( $z < 1000 ){
        $y=0;
        while( $y < 1000 ){
                $x=0;
                while( $x < 1000 ){
                        print( DF3OUT pack "n",int(rand 65535)+1);
                        $x=$x+1;
                }
                $y=$y+1;
        }
        $z=$z+1;
}


close(DF3OUT);

....also I took your example from below to display the values.
Works all quite nice.

As I am quite new in Povray, I have two more questions:

The original plan was to make the values looking like a cloud. I think there
should be a way to let povray generate clouds from the values.

Also I'd like povray to differ the values ( currently random-numbers) by
displaying them in different colors...

Thank in advance

Marcus


"Chris B" <nom### [at] nomailcom> wrote:
> Hi Again Marcus,
>
> Just to check it out I typed in a simple DF3 file in Hex:
>
> 00 02 00 02 00 02
> FF 00 00 00 00 00 00 FF
>
> and rendered it using:
>
> camera {location <0.5,0.5,-1> look_at 0.5}
> light_source {   <-4,75 ,-10   >, rgb 1}
>
> box {<0,0,0>, <1,1,1>
>   pigment { rgbt 0.9 }
>   interior {
>     media {
>       emission <1,1,1>
>       density {
>          density_file df3 "ngtest24.df3"
>       }
>     }
>   }
>   hollow
> }
>
> The first 'FF' appears bottom, near left. The second top, far right.
>
> Regards,
> Chris B.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.